<?php
// +----------------------------------------------------------------------
// | 07FLYCRM [基于ThinkPHP5.0开发]
// +----------------------------------------------------------------------
// | Copyright (c) 2016-2021 http://www.07fly.xyz
// +----------------------------------------------------------------------
// | Professional because of focus  Persevering because of happiness
// +----------------------------------------------------------------------
// | Author: 开发人生 <goodkfrs@qq.com>
// +----------------------------------------------------------------------
namespace app\workflow\model;

/**
 * 业务关联表=》模型
 */
class WorkflowBusinessHistory extends WorkflowBase
{
    //0=待处理,1=通过，2=驳回，3=转发
    public function deal_status($key = '')
    {
        $data = array(
            "0" => array(
                'name' => '待处理',
                'html' => '<span class="label">待处理</span>',
            ),
            "1" => array(
                'name' => '通过',
                'html' => '<span class="label label-info">通过</span>',
            ),
            "2" => array(
                'name' => '驳回',
                'html' => '<span class="label label-danger">驳回</span>',
            ),
            "3" => array(
                'name' => '转发',
                'html' => '<span class="label label-warning">转发</span>',
            ),
        );
        return (array_key_exists($key, $data)) ? $data[$key] : $data;
    }

    //0=待处理,1=通过，2=驳回，3=转发
    public function sign_type_name($key = '')
    {
        switch ($key) {
            case '2':
                $string = '【会签(任意一人)】';
                break;
            case '3':
                $string = '【会签(多人会签)】';
                break;
            default:
                $string='';
                break;
        }
        return $string;
    }

}
